import {
  SystemZeroCodeAutomationQueryVersion,
  SystemZeroCodeAutomationSave,
  SystemZeroCodeAutomationFindById,
  SystemZeroCodeFindColumnJsonByMenuId,
} from "@/services/api";
import { request, METHOD } from "@/utils/request";

/**
 * 保存
 */
export async function save(form) {
  return request(SystemZeroCodeAutomationSave, METHOD.POST, form);
}

/**
 * 根据Id获取
 */
export function findById(id) {
  return request(SystemZeroCodeAutomationFindById + "/" + id, METHOD.GET, {});
}

/**
 * 获取配置
 */
export function findColumnJson(form) {
  return request(SystemZeroCodeFindColumnJsonByMenuId, METHOD.POST, form);
}
/**
 * 获取历史版本
 */
export function findVersion(form) {
  return request(SystemZeroCodeAutomationQueryVersion, METHOD.POST, form);
}
export default {
  save,
  findById,
  findColumnJson,
  findVersion,
};
